<!DOCTYPE html>
<html>
  <head>
    <title>注册页面</title>
	<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
    <!-- Bootstrap -->
    <link href="bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen">
    <link href="bootstrap/css/bootstrap-responsive.min.css" rel="stylesheet" media="screen">
    <link href="assets/styles.css" rel="stylesheet" media="screen">
     <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
      <script src="vendors/html5.js"></script>
    <![endif]-->
    <script src="vendors/modernizr-2.6.2-respond-1.1.0.min.js"></script>
  </head>
  <body id="login" style="background-image: url(./assets/bg.jpg);background-position:center;background-repeat:no-repeat;background-size:cover">

    <div class="container">

      <form class="form-signin" action="doSigin.php" method="post" onsubmit="return toVaild()">
        <h2 class="form-signin-heading">用户注册</h2>
        <input type="text" name="username" id="username" value="" class="input-block-level" placeholder="用户名">
        <input type="password"  name="passwd" id="passwd" value="" class="input-block-level" placeholder="密码">
        <input type="text"  name="code" id="code" value="" class="input-block-level" placeholder="密钥">
       <small>注：密钥用于找回密码，请妥善保存</small>
      <br>
        <button class="btn btn-large btn-primary" style="width:100%;margin:0 auto" type="submit" name="ok">注册</button>
        <a href="./login.php" class="pull-left">已有账号返回登录</a>
        <a href="./getBack.php" class="pull-right">找回密码</a>
      </form>

    </div> <!-- /container -->
    <script src="vendors/jquery-1.9.1.min.js"></script>
    <script src="bootstrap/js/bootstrap.min.js"></script>
    <script>
       // 表单验证
       function toVaild() {
            var uname = document.getElementById("username").value;
            var pwd = document.getElementById("passwd").value;
            var code = document.getElementById("code").value;
            if (uname && pwd&&code) {
                return true;
            } else {
                alert("用户名或密码或密钥不能为空！！！");
                return false;
            }
        }
    </script>
  </body>
</html>